<?php
namespace app\common\model;
class Testweixin extends Base{
    function city(){
        return $this->belongsTo('district','city_id')->bind(['city'=>'name'])->field('id,name');
    }
    function attr(){
        return $this->belongsToMany('testattr','weixin_attr','attr_id','wx_id');
    }
}